]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
network: fix alignment of secure vs insecure wireless icons
authorDan Winship <danw@gnome.org>
Tue, 29 Mar 2011 15:45:45 +0000 (11:45 -0400)
committerDan Winship <danw@gnome.org>
Mon, 4 Apr 2011 13:30:53 +0000 (09:30 -0400)
Since the icon area is end-aligned, the signal strength icon for
insecure networks was ending up aligned with the lock icon for secure
networks. Fix that by always including a _secureIcon, but having it be
blank for the insecure networks.

https://bugzilla.gnome.org/show_bug.cgi?id=646121

js/ui/status/network.js

index 300c08dd2d62a448c3f744e58467761f9819bf2e..88521888a5070c6055087f3a1b7e9ab3008ebbe9 100644 (file)
@@ -113,12 +113,11 @@ NMNetworkMenuItem.prototype = {
                                          style_class: 'popup-menu-icon' });
         this._icons.add_actor(this._signalIcon);
 
+        this._secureIcon = new St.Icon({ style_class: 'popup-menu-icon' });
         if (this.bestAP._secType != NMAccessPointSecurity.UNKNOWN &&
-            this.bestAP._secType != NMAccessPointSecurity.NONE) {
-            this._secureIcon = new St.Icon({ icon_name: 'network-wireless-encrypted',
-                                             style_class: 'popup-menu-icon' });
-            this._icons.add_actor(this._secureIcon);
-        }
+            this.bestAP._secType != NMAccessPointSecurity.NONE)
+            this._secureIcon.icon_name = 'network-wireless-encrypted';
+        this._icons.add_actor(this._secureIcon);
 
         this._accessPoints = [ ];
         for (let i = 0; i < accessPoints.length; i++) {